package org.qy.star_common.message;


/**
 * @author yinger
 * @description 消息属性
 * @date 2024/3/26 08:07
 **/
public class MessageProperties {
    private String messageId;       // 消息唯一标识
    private String routingKey;      // 消息路由键
    private int deliveryMode = 2;   // 消息持久化模式 -（1 -> 持久化消息，2 -> 非持久化消息）
    public MessageProperties(String messageId, String routingKey, int deliveryMode) {
        this.messageId = messageId;
        this.routingKey = routingKey;
        this.deliveryMode = deliveryMode;
    }

    public MessageProperties() {
    }

    public String getMessageId() {
        return messageId;
    }

    public void setMessageId(String messageId) {
        this.messageId = messageId;
    }

    public String getRoutingKey() {
        return routingKey;
    }

    public void setRoutingKey(String routingKey) {
        this.routingKey = routingKey;
    }

    public int getDeliveryMode() {
        return deliveryMode;
    }

    public void setDeliveryMode(int deliveryMode) {
        this.deliveryMode = deliveryMode;
    }
}

